import Vue from 'vue'
import Vuex from 'vuex'
// import createPersistedState from "vuex-persistedstate"
import vuexPersist from 'vuex-persist'
import operation from './modules/operation/operation'
import homex from './modules/homex/homex'
import userinfor from './modules/userinfor/userinfor'
import manageuser from './modules/manageuser/manageuser'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
   
    menuOpen:true,
  },
  mutations: {
    ACTIONBUTTON: (state) => {
      state.menuOpen = !state.menuOpen
  },
  },
  actions: {
  },
  modules: {
    operation,
    homex,
    userinfor,
    manageuser
  },
  plugins: [
    new vuexPersist({
      storage: window.sessionStorage
    }).plugin
  ]

})
